<template>
  <div>
    <Header />
    <router-view></router-view>
    <!-- <Footer v-if="isFooterShow" /> -->
    <Footer v-if="!$route.meta.isHidden" />
  </div>
</template>

<script>
import Header from "@/components/Header";
import Footer from "@/components/Footer";
import { mapActions } from "vuex";
export default {
  name: "App",
  components: {
    Header,
    Footer,
  },
  mounted() {
    // console.log(this);
    //初始化TypeNav的三级分类数据,防止公共组件多次使用的时候,进行多次请求
    this.getCategoryList();
  },
  computed: {
    //控制当前是否展示Footer组件
    /* isFooterShow() {
      return this.$route.name !== "login" && this.$route.name !== "register";
    }, */
  },
  methods: {
    ...mapActions("category", ["getCategoryList"]),
  },
};
</script>

<style></style>
